bitkeeper revision 1.1534 (42938f7eteOfeZAlPZyFJuucXgIZbA)
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Tue, 24 May 2005 20:33:02 +0000 (20:33 +0000)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Tue, 24 May 2005 20:33:02 +0000 (20:33 +0000)
Makefile:
  xc_io.[ch] is no longer needed.
xc_vmx_build.c:
  offsetof() needs #include <stddef.h>, which was getting pulled in
  implicitly from xc_io.h.
.del-xc_io.h~f59d36f1439a3f8d:
  Delete: tools/libxc/xc_io.h
.del-xc_io.c~2d9e23eb479fe52:
  Delete: tools/libxc/xc_io.c
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
.rootkeys
tools/libxc/Makefile
tools/libxc/xc_io.c [deleted file]
tools/libxc/xc_io.h [deleted file]
tools/libxc/xc_vmx_build.c

index 720c76406ed1312cde9e33aa20e0d6d15df08c67..3526ae3342ef7848532a9abb06475cb83b124776 100644 (file)
--- a/.rootkeys
+++ b/.rootkeys
 40278d99BLsfUv3qxv0I8C1sClZ0ow tools/libxc/xc_elf.h
 403e0977Bjsm_e82pwvl9VvaJxh8Gg tools/libxc/xc_evtchn.c
 4227c129ZKjJPNYooHVzBCyinf7Y6Q tools/libxc/xc_gnttab.c
-40e03333Eegw8czSWvHsbKxrRZJjRA tools/libxc/xc_io.c
-40e03333vrWGbLAhyJjXlqCHaJt7eA tools/libxc/xc_io.h
 3fbba6dbNCU7U6nsMYiXzKkp3ztaJg tools/libxc/xc_linux_build.c
 3fbba6dbl267zZOAVHYLOdLCdhcZMw tools/libxc/xc_linux_restore.c
 3fbba6db7li3FJiABYtCmuGxOJxEGw tools/libxc/xc_linux_save.c
index 041bf444232eab2a0108652cf72705e51b9bedbc..e5db1adcf6f1cb91b81c371aaf6d31f30eaeb265 100644 (file)
@@ -22,7 +22,6 @@ SRCS     += xc_core.c
 SRCS     += xc_domain.c
 SRCS     += xc_evtchn.c
 SRCS     += xc_gnttab.c
-SRCS     += xc_io.c
 SRCS     += xc_linux_build.c
 SRCS     += xc_plan9_build.c
 SRCS     += xc_linux_restore.c
diff --git a/tools/libxc/xc_io.c b/tools/libxc/xc_io.c
deleted file mode 100644 (file)
index 5589483..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#include "xc_io.h"
-#include <sys/time.h>
-
-void xcio_timestamp(XcIOContext *ctxt, const char *msg){
-  struct timeval tv;
-
-  gettimeofday(&tv, NULL);
-  if (msg[0] != '\b' && msg[0] != '\r')
-      fprintf(stdout, "[%08ld.%06ld] ", tv.tv_sec, tv.tv_usec);
-}
-
-void xcio_error(XcIOContext *ctxt, const char *msg, ...){
-  va_list args;
-
-  va_start(args, msg);
-  vfprintf(stdout, msg, args); fprintf(stdout, "\n"); fflush(stdout);
-  IOStream_vprint(ctxt->info, msg, args);
-  IOStream_print(ctxt->info, "\n");
-  va_end(args);
-}
-
-void xcio_info(XcIOContext *ctxt, const char *msg, ...){
-  va_list args;
-
-  if(0 && !(ctxt->flags & XCFLAGS_VERBOSE)) return;
-  va_start(args, msg);
-  xcio_timestamp(ctxt, msg);
-  vfprintf(stdout, msg, args); fprintf(stdout, "\n");
-  IOStream_vprint(ctxt->info, msg, args);
-  fflush(stdout);
-  va_end(args);
-}
-
-void xcio_debug(XcIOContext *ctxt, const char *msg, ...){
-  va_list args;
-
-  if(0 && !(ctxt->flags & XCFLAGS_DEBUG)) return;
-  va_start(args, msg);
-  xcio_timestamp(ctxt, msg);
-  vfprintf(stdout, msg, args); fprintf(stdout, "\n");
-  IOStream_vprint(ctxt->info, msg, args);
-  va_end(args);
-}
diff --git a/tools/libxc/xc_io.h b/tools/libxc/xc_io.h
deleted file mode 100644 (file)
index 4325473..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-#ifndef __XC_XC_IO_H__
-#define __XC_XC_IO_H__
-
-#include <errno.h>
-#include "xc_private.h"
-#include "iostream.h"
-
-typedef struct XcIOContext {
-    u32 domain;
-    unsigned flags;
-    int resource;
-    IOStream *io;
-    IOStream *info;
-    IOStream *err;
-    char *vmconfig;
-    int vmconfig_n;
-    int (*suspend)(void *data, u32 domain);
-    int (*configure)(void *data, u32 domain, char *vmconfig, int vmconfig_n);
-    void *data;
-} XcIOContext;
-
-static inline int xcio_suspend_domain(XcIOContext *ctxt){
-    int err = 0;
-
-    if(ctxt->suspend){
-        err = ctxt->suspend(ctxt->data, ctxt->domain);
-    } else {
-        err = -EINVAL;
-    }
-    return err;
-}
-
-static inline int xcio_configure_domain(XcIOContext *ctxt){
-    int err = 0;
-
-    if(ctxt->configure){
-        err = ctxt->configure(ctxt->data, ctxt->domain, ctxt->vmconfig, ctxt->vmconfig_n);
-    } else {
-        err = -EINVAL;
-    }
-    return err;
-}
-
-static inline int xcio_read(XcIOContext *ctxt, void *buf, int n){
-    int rc;
-
-    rc = IOStream_read(ctxt->io, buf, n);
-    return (rc == n ? 0 : -1);
-}
-
-static inline int xcio_write(XcIOContext *ctxt, void *buf, int n){
-    int rc;
-
-    rc = IOStream_write(ctxt->io, buf, n);
-    return (rc == n ? 0 : -1);
-}
-
-static inline int xcio_flush(XcIOContext *ctxt){
-    return IOStream_flush(ctxt->io);
-}
-
-extern void xcio_error(XcIOContext *ctxt, const char *msg, ...);
-extern void xcio_info(XcIOContext *ctxt, const char *msg, ...);
-
-#define xcio_perror(_ctxt, _msg...) \
-xcio_error(_ctxt, "(errno %d %s)" _msg, errno, strerror(errno), ## _msg)
-
-#endif /* ! __XC_XC_IO_H__ */
-
-
-
index 31319db21a01925610639c4a9b0eb276a50f1e58..360f3757448968d6b14233385ec5dc0dd2831652 100644 (file)
@@ -2,6 +2,7 @@
  * xc_vmx_build.c
  */
 
+#include <stddef.h>
 #include "xc_private.h"
 #define ELFSIZE 32
 #include "xc_elf.h"